package com.cassiopae.entity;

import java.io.Serializable;
import java.util.Date;

public class Profile implements Serializable{
	private static final long serialVersionUID = 1L;
	
	private int id;
	private String databaseCible;
	private String schemaCible;
	private String password;
	private String nomProfile;
	private String dbVersion;
	private String appliVersion;
	private Date beginHour;
	private Date endHour;
	private String fileName;
	private String dumpType;
	private String impSchema;
	private String schemaSource;
	private String schemaCibleFront;
	private String pwdCibleFront;
	private Boolean status;
	
	
	public Profile() {
	}

	public Profile(String _databaseCible, String _schemaCible,
			String _password,  String _dbVersion, String _appliVersion, Date _beginHour, Date _endHour, String _impSchema) {
		//this.id = id;
		databaseCible = _databaseCible;
		schemaCible = _schemaCible;
		password = _password;
		nomProfile = schemaCible+"@"+databaseCible;
		dbVersion = _dbVersion;
		appliVersion = _appliVersion;
		beginHour = _beginHour;
		endHour = _endHour;
		status = false;
		impSchema = _impSchema;
	}



	public int getId() {
		return id;
	}

	public void setId(int id) {
		this.id = id;
	}

	public String getDatabaseCible() {
		return databaseCible;
	}

	public void setDatabaseCible(String databaseCible) {
		this.databaseCible = databaseCible;
	}

	public String getSchemaCible() {
		return schemaCible;
	}

	public void setSchemaCible(String schemaCible) {
		this.schemaCible = schemaCible;
	}

	public String getPassword() {
		return password;
	}

	public void setPassword(String password) {
		this.password = password;
	}

	public String getNomProfile() {
		nomProfile = schemaCible+"@"+databaseCible;
		return nomProfile;
	}

	public void setNomProfile(String nomProfile) {
		this.nomProfile = nomProfile;
	}
	
	public String getDbVersion() {
		return dbVersion;
	}

	public void setDbVersion(String dbVersion) {
		this.dbVersion = dbVersion;
	}

	public String getAppliVersion() {
		return appliVersion;
	}

	public void setAppliVersion(String appliVersion) {
		this.appliVersion = appliVersion;
	}


	public Date getBeginHour() {
		return beginHour;
	}

	public void setBeginHour(Date beginHour) {
		this.beginHour = beginHour;
	}


	public Date getEndHour() {
		return endHour;
	}

	public void setEndHour(Date endHour) {
		this.endHour = endHour;
	}

	public String getFileName() {
		return fileName;
	}

	public void setFileName(String fileName) {
		this.fileName = fileName;
	}

	public String getDumpType() {
		return dumpType;
	}

	public void setDumpType(String dumpType) {
		this.dumpType = dumpType;
	}

	public String getImpSchema() {
		return impSchema;
	}

	public void setImpSchema(String impSchema) {
		this.impSchema = impSchema;
	}

	public String getSchemaSource() {
		return schemaSource;
	}

	public void setSchemaSource(String schemaSource) {
		this.schemaSource = schemaSource;
	}

	public String getSchemaCibleFront() {
		return schemaCibleFront;
	}

	public void setSchemaCibleFront(String schemaCibleFront) {
		this.schemaCibleFront = schemaCibleFront;
	}

	public String getPwdCibleFront() {
		return pwdCibleFront;
	}

	public void setPwdCibleFront(String pwdCibleFront) {
		this.pwdCibleFront = pwdCibleFront;
	}
	

	public Boolean getStatus() {
		return status;
	}

	public void setStatus(Boolean status) {
		this.status = status;
	}

	@Override
	public int hashCode() {
		final int prime = 31;
		int result = 1;
		result = prime * result
				+ ((nomProfile == null) ? 0 : nomProfile.hashCode());
		return result;
	}



	@Override
	public boolean equals(Object obj) {
		if (this == obj)
			return true;
		if (obj == null)
			return false;
		if (getClass() != obj.getClass())
			return false;
		Profile other = (Profile) obj;
		if (nomProfile == null) {
			if (other.nomProfile != null)
				return false;
		} else if (!nomProfile.equals(other.nomProfile))
			return false;
		return true;
	}


	

}
